package org.iblink.core.service;

import java.util.List;

import org.iblink.core.domain.model.Asset;
import org.iblink.core.domain.model.Category;

public interface AssetService {
  /**
   * <p>Saves an asset.</p>
   * @param asset the asset to save
   */
  void save(Asset asset);
  
  /**
   * <p>Deletes an asset.</p>
   * @param asset the asset to delete
   */
  void delete(Asset asset);
  
  /**
   * Lists all assets assigned to category {@code category}
   * @param category the category for which we want the assets
   * @return the lists of assets assigned to the given category
   */
  List<Asset> getAssetsForCategory(Category category);
  
  /**
   * Find the asset with the given path.
   * 
   * @param path the path of the asset to find
   * @return the {@link org.iblink.core.domain.model.Asset} with path {@code path}
   */
  Asset findByPath(String path);
}
